package com.example.administrator.chesstest01;

import android.util.Log;

import java.io.PrintWriter;

/**
 * Created by Administrator on 2016/6/25.
 */
public class SendDataThread implements Runnable{
    private String TAG = "SendDataThread";
    private PrintWriter pw = null;
    private String data = null;
    public SendDataThread (PrintWriter pw , String data){
        this.pw = pw;
        this.data = data;
    }
    @Override
    public void run() {
        if (null != pw){
            pw.println(data);
            pw.flush();
            Log.d(TAG,data);
        }
    }
}